<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/html">
<head>
    {% include "/include/headinclude.html" %}
</head>
<body style="padding-top: 70px; ">
   {% include "/include/headnav.html" %}
   <!--主框架开始 -->
   <div class="container">
       <!--行式布局 -->
      <div class="row">
             <!--左边栏开始 -->
        <div class="col-xs-4 col-md-3 bg-info">
            {% include "/include/leftnav.html" %}
        </div>
             <!--左边栏结束 -->
          <!--主界面开始 -->
        <div class="col-xs-8 col-md-9">
            <h1 class="page-header">主机管理</h1>
            <div class="panel  panel-primary">
              <!-- Default panel contents -->
              <div class="panel-heading">
                  <span class="glyphicon glyphicon-wrench" aria-hidden="true"></span>
                  主机管理
              </div>
              <!-- Table -->
              <table class="table table-bordered">
                  <tr align="center">
                        <th>序号</th><th>IP</th><th>端口</th><th>组</th><th>用户名</th><th>登录方式</th><th>密码</th><th>状态</th><th>操作</th>
                  </tr>
                   {% for item in hostlist %}
                  <tr>
                        <td>{{loop.index}}</td><td>{{ item.ip }}</td><td>{{ item.port }}</td><td>{{ item.group }}</td><td>{{ item.username }}</td><td>0</td><td>******</td>
                        <td>
                           <button type="button" class="btn btn-success"><span class="glyphicon glyphicon-ok"></span></button>
                        </td>
                        <td>
                           <a href="javascript:void(0);"  class="btn btn-danger" onclick="delserver('{{ item.ip }}')" data-addvalue = "{{item.ip}}">删除</a>
                        </td>
                  </tr>
                  {% endfor %}
              </table>
            </div>


            <div class="panel  panel-info">
              <!-- Default panel contents -->
                 <div class="panel-head">
                      <h4>添加主机</h4>
                 </div>
              <!-- Table -->
                <div class="panel-body">
                <form>
                      <div class="form-group">
                        <label for="inputIp" class="col-sm-2 control-label"><span class="glyphicon glyphicon-wrench" aria-hidden="true"></span>
                            IP</label>
                          <div class="col-sm-10">
                        <input type="text" class="form-control" id="inputIp" placeholder="主机">
                              </div>
                      </div>
                      <div class="form-group">
                        <label for="inputPort" class="col-sm-2 control-label"><span class="glyphicon glyphicon-wrench" aria-hidden="true"></span>
                            端口</label>
                          <div class="col-sm-10">
                        <input type="number" class="form-control" id="inputPort" placeholder="主机端口" max="8888" min="22" value="22">
                              </div>
                      </div>
                      <div class="form-group">
                        <label for="inputGroup" class="col-sm-2 control-label"><span class="glyphicon glyphicon-wrench" aria-hidden="true"></span>
                            组</label>
                          <div class="col-sm-10">
                        <input type="text" id="inputGroup" class="form-control" placeholder="主机用户组">
                              </div>
                      </div>
                      <div class="form-group">
                            <label for="inputUserName" class="col-sm-2 control-label"><span class="glyphicon glyphicon-wrench" aria-hidden="true"></span>
                            用户名</label>
                           <div class="col-sm-10">
                                <input type="text" id="inputUserName" class="form-control" placeholder="主机用户名" >
                           </div>
                      </div>
                      <div class="form-group">
                        <label for="selectLoginType" class="col-sm-2 control-label">登录方式</label>
                        <div class="col-sm-4">
                            <select id="selectLoginType" class="form-control">
                                 <option valule="密码方式">密码方式</option>
                            </select>
                        </div>
                         <label for="inputPassword" class="col-sm-2 control-label">密码</label>
                        <div class="col-sm-4">
                          <input type="password" class="form-control" id="inputPassword" placeholder="密码" value="">
                        </div>
                      </div>
                      <button type="button" class="btn btn-default" id="btn_addserver">提交</button>
                    </form>
                    </div>
                </div>
                <!--整体浏览界面 -->
            <!--整体浏览界面 -->

        </div>
          <!--主内容布局结束 -->
      </div>
       <!--行式布局结束 -->
   </div>
   <!--主框架结束 -->
{% include "/include/buttom.html" %}
<script type="text/javascript" src="/static/res/js/machinemanager.js"></script>
</body>
</html>